/*
 * @Author: Du Weixing duweixing@sgsimulation.com
 * @Date: 2024-09-04 11:13:35
 * @LastEditors: yintulong 490929251@qq.com
 * @LastEditTime: 2025-05-31 17:04:36
 * @FilePath: \SGFEM\Solver\PublicElement\Factory\src\PublicElementCalculatorRegister.cpp
 * @Description: 单元计算注册
 * 
 * Copyright (c) 2024 by 神工仿真, All Rights Reserved. 
 */

#include "ElementCalculatorRegister.h"
#include "../Factory/ElementCalculatorFactory.h"
#include "../MassElement/Conm1ElementCalculator.h"
#include "../MassElement/Conm2ElementCalculator.h"
#include "../RodElement/RodCalculator.h"
#include "../BarElement/BarCalculator.h"
#include "../ShearElement/ShearElementCalculator.h"
#include "../BushElement/BushCalculator.h"
#include "../ScalarElements/ELAS1Calculator.h"
#include "../ScalarElements/MASSiCalculator.h"
#include "../SolidElement/Tetra4ElementCalculator.h"
#include "../SolidElement/Hexa8SRIElementCalculator.h" // 此单元对标 ANSYS Solid45无附加形函数形式， 暂时不使用

#include "SGFem/ElementCalculator/ThermalElement/Quad4ThermalCalculator.h"
#include "SGFem/ElementCalculator/ThermalElement/Tria3ThermalCalculator.h"
#include "SGFem/ElementCalculator/ThermalElement/Tetra4ThermalCalculator.h"
#include "SGFem/ElementCalculator/ThermalElement/Hexa8ThermalCalculator.h"
#include "SGFem/ElementCalculator/ThermalElement/CHBDYGAREACalculator.h"
#include "SGFem/ElementCalculator/ThermalElement/CHBDYPLINECalculator.h"


using SG::DataStructure::FEM::ElementTypes;
using namespace SG::FEMSolver::Element;

void SG::FEMSolver::Element::elementCalculatorRegister ()
{
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_Conm1, Conm1ElementCalculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_Conm2, Conm2ElementCalculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_ScalarSpring, ELAS1Calculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_ScalarSpring2, ELAS1Calculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_MASS1, MASSiCalculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_MASS2, MASSiCalculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_Link, RodCalculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_Bush, BushCalculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_LinkNoRef, RodCalculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_Bar, BarCalculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_Shear, ShearElementCalculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_Tetra4, Tetra4ElementCalculator::Create);
    // ElementCalculatorFactory::Register (ElementTypes::ELETYPE_Hexa8SRI, Hexa8SRIElementCalculator::Create);
}

void SG::FEMSolver::Element::heatElementCalculatorRegister ()
{
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_ShellQuad4, Quad4ThermalCalculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_ShellTria3, Tria3ThermalCalculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_Tetra4, Tetra4ThermalCalculator::Create);
    ElementCalculatorFactory::Register (ElementTypes::ELETYPE_Hexa8SRI, Hexa8ThermalCalculator::Create);
    //ElementCalculatorFactory::Register (ElementTypes::ELETYPE_CHBDYP, CHBDYPLINECalculator::Create);
    //ElementCalculatorFactory::Register (ElementTypes::ELETYPE_CHBDYG, CHBDYGAREACalculator::Create);
}